package com.gxitsky.common.utils;

public class LogFormatUtil {

    /**
     * Formatter Exception Info
     */
    public static StringBuffer exceptionMsgFormat(Exception e) {
        StringBuffer sb = new StringBuffer();
        if (e != null) {
            sb.append(e.toString());
            for (StackTraceElement element : e.getStackTrace()) {
                sb.append("\r\n\t").append(element);
            }
        }
        return sb.length() == 0 ? null : sb;
    }
}
